<?php
namespace app\index\controller;

use think\Request;
use think\Db;

class Order extends Common
{   
    public function _initialize()
    {
        parent::_initialize();
    }

    public function index()
    {
    	return $this->fetch();
    }

    public function orderList()
    {   
        $page = 1;
        $pageSize = 10;
        //商品 单价 数量 操作 付款 状态
        $id = UID;
        $list = DB::name('order_base')
                    ->field('a.oId as oId, a.oCreateTime as time, b.price as price, b.num as num, c.gName' )
                    ->alias('a')
                    ->where('a.uid', UID)
                    ->where('a.status', 'gt', '0')
                    ->join('__ORDER_GOODS__ b', 'a.oId=b.oId', 'LEFT')
                    ->join('__GOODS__ c', 'b.gSn=c.gSn', 'LEFT')
                    ->order('a.oCreateTime desc')
                    ->page($page, $pageSize)
                    ->select();


    }
    public function detail()
    {
        
    }
    public function cancel()
    {

    }
    public function confrim()
    {
    	
    }
}
